<?php
include("includes/init.php");
$sqlb = @mysql_query("select * from duan where IDDuAn = '".$_GET['MaDuAn']."'");
$rowsb = @mysql_fetch_array($sqlb);
$TenDuAn=$rowsb['TenDuAn'];
$sqla = @mysql_query("select * from danhmuc where IDDanhMuc = '".$rowsb['DanhMuc']."'");
$rowsa = @mysql_fetch_array($sqla);
$TenDanhMuc=$rowsa['TenDanhMuc'];
$title="$TenDuAn - Giá ".$rowsb['Gia']." | $TenDanhMuc | $TenSite";
$description=$rowsb['Description'];
$tags=$rowsb['Tags'];
include ("template/Header.php");
@mysql_query("UPDATE duan SET Xem='".($rowsb['Xem']+1)."' WHERE IDDuAn = '".$_GET['MaDuAn']."'");
?>
<div class="c"></div>
</div>
</div>
</div>
<script type="text/javascript">
 
  shop.header.conf.numItemWish	= 0;
  shop.header.conf.numOrderI 	= 0;
  jQuery(document).ready(function(){
	shop.header.init();
		shop.header.menuCat();  });
</script></div>
    <div class="main">
    	<div>
				<div class="lbreakcumb fixPNG">
<div class="rbreakcumb fixPNG">
<div class="cenbreakcumb fixPNG">
<ul class="menubreakcumb">
<li style="padding-left:10px;">
<a href="<?php echo $link;?>"><?php echo $TenSite;?></a>
</li>
<li style="">
<a href="<?php $url=stripUnicode($TenDanhMuc);
    $url=ereg_replace('[[:space:]]+', '-', trim($url)); echo ''.$link.'Danh-Muc-'.$rowsa['IDDanhMuc'].'-'.$url.'.html';?>"><?php echo $TenDanhMuc;?></a>
</li>
<li style="background:none;">
<span><?php echo $TenDuAn;?></span>
</li>
</ul>
</div>
</div>
</div>			 
 </div>
        <div class="block-content">
            <div class="leftcontents">
				
<div class="leftcontents" id="productItem29631">
<div class="main_view">
<?php
$sql = @mysql_query("select * from duan where IDDuAn = '".$_GET['MaDuAn']."'");
$rows = @mysql_fetch_array($sql);

    $url=stripUnicode($rows['TenDuAn']);
    $url=ereg_replace('[[:space:]]+', '-', trim($url));
    if($rows['MoTa']==""){
        $NoiDung=''.substr(strip_tags($rows['NoiDung']),0,400).'';
        $NoiDung=substr($NoiDung, 0, strrpos($NoiDung, ' ')).'...';
    }else{
        $NoiDung=$rows['MoTa'];
    }
     
   echo ' 
<div class="cont-maindear">
<div class="mainimg" >
<div class="v6ItemHomeHover hidden" id="itemHomeMoreD">
<a class="v6ImageHover" item_id=29631 rel=" ">
<div class="v6ItemHotHoverText" align="center"></div>
</a>
<div class="v6ItemHotHomeHoverTextT" align="center">
'.$rows['DiaChi'].'
</div>			
 
</div>
<a href="javascript:void(0)" class="setDealWh">
 
<img src="'.$rows['LoGo'].'" width="475" height="475" alt="'.$rows['TenDuAn'].'"/>
</a>
</div>
<div class="right-contdear width256">
<div class="title-maindear">
<div class="v6TitleShort" style="height: 70px">
<h1>'.$rows['TenDuAn'].'</h1>  <div class="v7typeproduct fl m0 mTop5" style="color: #555">';
$sqla = @mysql_query("select TenDanhMuc from danhmuc where IDDanhMuc = '".$rows['DanhMuc']."'");
$rowsa = @mysql_fetch_array($sqla);
echo ' '.$rowsa['TenDanhMuc'].'</div>											</div>
</div>
<div class="boxPrices">
<div class="boxPrices_view fixPNG width283">
<!--<div class="boxPricesPadding">-->
<div class="v6Price mTop10" align="center">
'.$rows['Gia'].'<span></span>
</div>
 
<div class="v6BuyNow" >
<a class=" fixPng" href="Dang-Ky-Tham-Quan-'.$rows['IDDuAn'].'-'.$url.'.html"></a>
</div>
<!--</div>-->
</div>
</div>
<div class="v6BorderBot" >
<div class="v6BottomPrice">
<div class="s" style="width:230px;height:200px;overflow:hidden;text-align:justify"><b><br/>
 '.$NoiDung.'
<br/> <br/></b></div>
</div>
</div>
<div class="v6BorderBot pTop5" style="border-bottom:none">
<div> <i>'.$rows['DiaChi'].'</i></div>
</div>
</div>
<div class="c"></div>
<div class="bottomTopDeal">
<div class="v6ItemHomeHoverTextD fl">
<div class="pageView fl fixPNG">Lượt xem: '.$rows['Xem'].'</div>
 
</div>
 
 
</div>
 
<div class="c"></div>
</div>
</div>
 '; 

?>

</div>
 

<div class="main_view">
<div class="main-boxcontFull">
<div class="contents">
<h3 class="title_bold">Chi tiết dự án</h3>
<div><?php echo $rows['NoiDung'];?></div>

<div class="c"></div>
</div>
</div>
</div>



</div>

<script type="text/javascript">
	    //khoi tao extra neu co
    	jQuery(document).ready(function(){
		jQuery(".mainimg").hover(
			function(){
				var id = jQuery(this).attr('lang');
				jQuery("#itemHomeMoreD").fadeIn(200);
			},
			function(){
				var id = jQuery(this).attr('lang');
				jQuery("#itemHomeMoreD").fadeOut(200);
			}
		);
	});
	shop.changeimage = function(idname,url,total){//Thay đổi image map office
		jQuery('#imgmapoff').attr('src', url).slideDown();
		for(i=1;i<=total;i++){
			if(i==idname){
				jQuery('#viewline'+i).addClass('bg_adrviewa');
			}else{
				jQuery('#viewline'+i).removeClass('bg_adrviewa');
			}
		}
	};
    
</script> </div>
            <div class="right_contents">
<? include("template/DivHoTro.php");?>
 

<div class="main_view">
<div class="main-boxcontFull">
<div class="newBoxContent" id="p0">
<div class="blockSold">
<h2 class="dotLineNew titleblue14 mTop10">Dự án cùng danh mục</h2>							 
<?php
$sql1 = @mysql_query("select * from duan where DanhMuc = '".$rows['DanhMuc']."' and IDDuAn != '".$rows['IDDuAn']."' order by IDDuAn desc limit 15");
while ($rows1 = @mysql_fetch_array($sql1))
{
    $url=stripUnicode($rows1['TenDuAn']);
    $url=ereg_replace('[[:space:]]+', '-', trim($url));
   echo '<div class="blockSoldItem blockSoldHide1 mTop10 blockSoldItemBorder" id="blockSold28946" >
<h3 class="title m0 newqc"><a href="'.$link.'Du-An-'.$rows1['IDDuAn'].'-'.$url.'.html">'.$rows1['TenDuAn'].'</a></h3>
<div class="info mTop5 mBottom5">
<a href="'.$link.'Du-An-'.$rows1['IDDuAn'].'-'.$url.'.html" class="soldImgqc">
<img src="'.$rows1['LoGo'].'" alt="deal image" width="88" height="88"/>
 
</a>
<div class="soldInfo soldInfonew">
<div class="title m0 newqc"><a href="'.$link.'Du-An-'.$rows1['IDDuAn'].'-'.$url.'.html"><span></span></a></div>
<div class="mTop5">Giá: <b>'.$rows1['Gia'].'<span></span></b> </div>
<div > '.$rows1['DiaChi'].' </div>
</div>
<div class="c"></div>
</div>
</div>
'; 
}
?>
</div>
</div>
<div class="boxBottomLeft fixPNG"><div class="boxBottom"></div><div class="boxBottomRight fixPNG"></div><div class="c"></div></div>
</div>
</div></div>
  <div class="clear"></div>
        </div>  
    </div>
   <?php
include ("template/Footer.php");
?> 